package com.cirkana;

import com.cirkana.viewer.data.LocalDataProvider;
import com.cirkana.viewer.data.route.RouteLocalDataResolver;
import com.cirkana.viewer.data.security.SecurityDataResolver;

public class DataResolverUtil {

	private static LocalDataProvider localDataProvider;
	private static SecurityDataResolver securityDataResolver;
	private static RouteLocalDataResolver routeDataResolver;
	
	public static LocalDataProvider getLocalDataProvider() {
		if (localDataProvider == null)
			localDataProvider = new LocalDataProvider(ViewerActivity.getCurrentActivity());
		return localDataProvider;
	}
	
	public static SecurityDataResolver getSecurityDataResolver() {
		if (securityDataResolver == null)
			securityDataResolver = new SecurityDataResolver(getLocalDataProvider());
		return securityDataResolver;
	}
	
	public static RouteLocalDataResolver getRouteDataResolver() {
		if (routeDataResolver == null)
			routeDataResolver = new RouteLocalDataResolver(getLocalDataProvider());
		return routeDataResolver;
	}
	
}
